/**
 * Copyright @ 2000 ysten Co. Ltd. 
 * All right reserved.     
 * @author: wangmin
 * date: 2016-07-11     
 */
package com.task.repository;

import com.task.entity.FinishTasks;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface IFinishTasksRepository extends JpaRepository<FinishTasks, Long>, JpaSpecificationExecutor<FinishTasks> {

    FinishTasks findByChildTaskId(Long childTaskId);
 
    @Query("select count(*) from FinishTasks a where userId=?1")
	Integer getCountByUserId(String userId);
}
